package Test;

import java.util.Arrays;

//定义一个泛型类
public class MyArray<T> {
    public Object[] array = new Object[10];

    public void set(int pos, T val) {
        array[pos] = val;
    }

    public T get(int pos) {
        return (T) array[pos];
    }

    public Object[] getArray() {
        return array;
    }
}

